export default {
  setErrorCode(state, num) {
    state.errorCode = num
  },
  setData(state, data) {
    switch (state.type) {
      case 'today':
        state.todayData = data
        break
      case 'month':
        state.monthData = data
        break
      case 'year':
        state.yearData = data
        break
      case 'tomorrow':
        state.tomorrowData = data
        break
      case 'week':
        state.weekdayData = data
    }
  },
  setType(state, type) {
    state.type = type
  },
  setIndex(state, num) {
    state.navIdn = num
  },
  setConsName(state, name) {
    state.consName = name
  }
}
